{if count($aPhotos) > 0}
<table style="width: 100%;" cellpadding="4" cellspacing="0">
<tr>
    <td class="border2" valign="top">
        <table style="width: 100%;" class="mainmenu5" cellpadding="0" cellspacing="0" border="0">
            <tr>
            <td width="7"><img src="design/pic/spacer.gif" class="sqr1" alt="" height="7" width="7" /></td>
            <td class="block_header">{language text="group_gallery"}</td>
            </tr>
        </table>

        <div style="padding:5px;">
        	<div style="padding:15px;font-size:8pt;" class="">
        		<div style="text-align:center;">
        			<table style="width:100%;margin-left:auto;margin-right:auto;" cellpadding="5">
        			<tr>
        			{foreach from=$aPhotos item=aItem name=aitem}
        					<td style="vertical-align:middle;text-align:center;font-size:8pt;" class="color">
        						<a href="{url link='public.groups.gallery' id=$iGroupId image=$aItem.id}">
        						{img max_width="100" max_height="100" alt="" src="`$sImageUrl`thumb/`$aItem.id`.jpg" src_def="`$sImageUrl`/`$aItem.id`.jpg" def_width="100" src_def="design/pic/noimage.jpg"  border="0"}
        						</a>	
        					</td>
        			{/foreach}					
        			</tr></table></div>	
        	
        	
        	</div>
        	<div style="padding:4px;font-size:8pt;text-align:right;">
        	  <a class="link_action" href="{url link='public.groups.gallery' id=$iGroupId}">[ {language text="view_all_photos"} ]</a>
        	</div>
        </div>
    </td>
</tr>
</table>
{/if}